<html>
<head>
	<title>BCDB - Server</title>
	<script type="text/javascript" src="/static/MochiKit/MochiKit.js"></script>
	<script type="text/javascript">
		function ajaxSearch() {
			var gotMetadata = function(meta) {
				document.getElementById("content").innerHTML = meta.responseText;
				document.getElementById("back").focus();
			};
			var failed = function(meta) {
				alert("Nothing found !");
				document.getElementById("barcodeinput").value = "";
				document.getElementById("barcodeinput").focus();
			}
			d = doSimpleXMLHttpRequest("/search", {barcode: document.getElementById("barcodeinput").value});
			d.addCallbacks(gotMetadata, failed);
			return false;
		}
	</script>
	<link rel="stylesheet" type="text/css" href="/static/style.css" />
</head>
<body onload="javascript:document.getElementById('barcodeinput').focus();">
	<h1>BCDB - Server</h1>
	<h2>Warning : The web interface only search on local database (it doesn't search on external websites)</h2>
	<div id="content">
		<form action="#" onsubmit="return ajaxSearch();">
			<label for="barcode">Barcode :</label><input id="barcodeinput" type="text" name="barcode"/>
			<input type="submit" value="Search">
		</form>
	</div>
	<p id="copyright">Copyright (C) 2007 Alexis ROBERT</p>
	<p id="djangologo"><a href="http://www.djangoproject.com/"><img src="http://media.djangoproject.com/img/badges/djangomade124x25.gif" border="0" alt="Made with Django." title="Made with Django." /></a></p>
</body>
</html>	